PDF4Java Reference Documentation
com.o2sol.pdf4java.utilities Package / PDFEncryptor Class / encryptFile Method / encryptFile(String,String,String,PDFSecurityHandler,boolean) Method
Path to the input PDF file.
Password for the input file if it is encrypted, othewise null.
Path to the encrypted PDF file.
The security handler used for encryption.
If true then the internal structure of the output PDF file is compressed.
In This Topic
    encryptFile(String,String,String,PDFSecurityHandler,boolean) Method
    In This Topic
    Encrypts the input PDF file and saves the encrypted file to output path.
    Syntax
    public static void encryptFile( 
       java.lang.String inputFileName,
       java.lang.String inputPassword,
       java.lang.String outputFileName,
       PDFSecurityHandler securityHandler,
       boolean enableObjectCompression
    )

    Parameters

    inputFileName
    Path to the input PDF file.
    inputPassword
    Password for the input file if it is encrypted, othewise null.
    outputFileName
    Path to the encrypted PDF file.
    securityHandler
    The security handler used for encryption.
    enableObjectCompression
    If true then the internal structure of the output PDF file is compressed.
    See Also